POV-Ray : Newsgroups : povray.general : Mathematics help needed, please. : Re: Mathematics help needed, please. Server Time
12 Aug 2024 13:24:25 EDT (-0400)
  Re: Mathematics help needed, please.  
From: gemelli david
Date: 11 Feb 1999 10:22:38
Message: <36C2F531.3240D7E7@imerir.asso.fr>
Maybe it is this:

#declare xpos = xPoint2 - xPoint1;
#declare ypos = yPoint2 - yPoint1;
#declare zpos = zPoint2 - zPoint1;
#declare incx = xpos / NbSpheres;
#declare incy = ypos / NbSpheres;
#declare incz = zpos / NbSpheres;
#declare i = 1;
#while (i < NbSpheres)
    #declare xpos = xPoint1 + (incx * i);
    #declare ypos = yPoint1 + (incy * i);
    #declare zpos = zPoint1 + (incz * i);
    sphere {<xpos, ypos,zpos>, Radius ... }
    #declare i = i + 1;
#end
I'm not absolutly sure but it must be a good start ?

        David GEMELLI



> Okay, here's my problem. I'm working on an anim.
> Let's say I have two points in space. Joining these, I have a thin piece of elastic
( or
> similar stretchable material ). Threaded on this elastic are a number (
provisionally 5 )
> of spheres, spaced evenly.
> As the two points move around, how do I get the vector of each sphere as they remain
> evenly spaced along the elastic?
> I need the vector as each sphere will eventually become a blob component.
>
> Many thanks
>
> Andy


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.